<%@page import="uodm.server.Utils"%>
<%@page import="com.google.appengine.api.users.UserServiceFactory"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link href="uodm.css" rel="stylesheet" type="text/css">
<title>Testing Page</title>
</head>
<body>
	<a
		href="<%=UserServiceFactory.getUserService().createLoginURL(
					request.getRequestURL().toString())%>">Log
		in</a> |
	<a
		href="<%=UserServiceFactory.getUserService().createLogoutURL(
					request.getRequestURL().toString())%>">Log
		out</a>
	<table>
		<tr>
			<td>Full Request</td>
			<td><%=Utils.getFullRequestUrl(request)%></td>
		</tr>
		<tr>
			<td>RemoteAddr</td>
			<td><%=request.getRemoteAddr()%></td>
		</tr>
		<tr>
			<td>RemoteHost</td>
			<td><%=request.getRemoteHost()%></td>
		</tr>
		<tr>
			<td>RemotePort</td>
			<td><%=request.getRemotePort()%></td>
		</tr>
		<tr>
			<td>RemoteUser</td>
			<td><%=request.getRemoteUser()%></td>
		</tr>
		<tr>
			<td>RequestedSessionId</td>
			<td><%=request.getRequestedSessionId()%></td>
		</tr>
		<tr>
			<td>AuthType</td>
			<td><%=request.getAuthType()%></td>
		</tr>
		<tr>
			<td>CharacterEncoding</td>
			<td><%=request.getCharacterEncoding()%></td>
		</tr>
		<tr>
			<td>ContentLength</td>
			<td><%=String.valueOf(request.getContentLength())%></td>
		</tr>
		<tr>
			<td>ContentType</td>
			<td><%=request.getContentType()%></td>
		</tr>
		<tr>
			<td>ContextPath</td>
			<td><%=request.getContextPath()%></td>
		</tr>
		<tr>
			<td>LocalAddr</td>
			<td><%=request.getLocalAddr()%></td>
		</tr>
		<tr>
			<td>LocalName</td>
			<td><%=request.getLocalName()%></td>
		</tr>
		<tr>
			<td>LocalPort</td>
			<td><%=request.getLocalPort()%></td>
		</tr>
		<tr>
			<td>Locale</td>
			<td><%=request.getLocale()%></td>
		</tr>
		<tr>
			<td>Method</td>
			<td><%=request.getMethod()%></td>
		</tr>
		<tr>
			<td>PathInfo</td>
			<td><%=request.getPathInfo()%></td>
		</tr>
		<tr>
			<td>PathTranslated</td>
			<td><%=request.getPathTranslated()%></td>
		</tr>
		<tr>
			<td>Protocol</td>
			<td><%=request.getProtocol()%></td>
		</tr>
		<tr>
			<td>UserPrincipal</td>
			<td><%=request.getUserPrincipal()%></td>
		</tr>
		<tr>
			<td>UserPrincipal.Name</td>
			<td><%=request.getUserPrincipal() == null ? "" : request
					.getUserPrincipal().getName()%></td>
		</tr>
		<tr>
			<td>RequestURL</td>
			<td><%=request.getRequestURL()%></td>
		</tr>
		<tr>
			<td>RequestURI</td>
			<td><%=request.getRequestURI()%></td>
		</tr>
		<tr>
			<td>ServerName</td>
			<td><%=request.getServerName()%></td>
		</tr>
		<tr>
			<td>ServletPath</td>
			<td><%=request.getServletPath()%></td>
		</tr>
		<tr>
			<td>ServerPort</td>
			<td><%=request.getServerPort()%></td>
		</tr>
		<tr>
			<td>QueryString</td>
			<td><%=request.getQueryString()%></td>
		</tr>
		<tr>
			<td>Scheme</td>
			<td><%=request.getScheme()%></td>
		</tr>
	</table>
	<%-- 	<h1>Stack trace</h1>
	<table>
		<%
			StackTraceElement[] trace = Thread.currentThread().getStackTrace();
			for (int i = 0; i < trace.length; ++i) {
		%>
		<tr>
			<td><%=i + 1%></td>
			<td><%=trace[i].getMethodName()%></td>
			<td><%=trace[i].getClassName()%></td>
			<td><%=trace[i].getFileName()%></td>
		</tr>
		<%
			}
		%>
	</table>
 --%>
</body>
</html>